<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>条件渲染</title>
  </head>
  <body>
    <div id="app">
      <div v-if="grade >= 90">特别好</div>
      <div v-else-if="grade >= 80">优</div>
      <div v-else-if="grade >= 70">良</div>
      <div v-else-if="grade >= 60">及格</div>
      <div v-else="grade < 60">你要挨揍了</div>

      <div v-show="grade >= 90">特别好</div>
      <div v-show="grade >= 80 && grade < 90 ">优</div>
      <div v-show="grade >= 70 && grade < 80 ">良</div>
      <div v-show="grade >= 60 && grade < 70 ">及格</div>
      <div v-show="grade < 60">你要挨揍了</div>


    </div>

    <script src="../lib/vue.global.js"></script>
    <script>
      Vue.createApp({
        data() {
          return {
            grade:50
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
